import { Field, Int, ObjectType } from "@nestjs/graphql";
import { BaseEntity } from "./baseEntity";
import { ResponsibleOrder } from "@prisma/client";
import { UserEntity } from "./user.entity";
import { ShopEntity } from "./shop.entity";


@ObjectType()
export class ResponsibleOrderEntity extends BaseEntity implements ResponsibleOrder {
    @Field(() => Int)
    userId: number;

    @Field(() => UserEntity, { nullable: true })
    user?: UserEntity

    @Field(() => Int)
    total: number;

    @Field(() => Int)
    count: number;

    @Field(() => Int)
    money: number;

    @Field(() => Int)
    shopId: number;

    @Field(() => ShopEntity, { nullable: true })
    shop?: ShopEntity
}